package org.netty.push.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class BaseResult<T> {

	@ApiModelProperty(value="接口请求标识")
	private Boolean success;
	@ApiModelProperty(value="消息处理状态吗")
	private String code;
	@ApiModelProperty(value="错误描述信息")
	private String errormsg;
	private T data;
	public  BaseResult() {
		this.success=false;
	}
	
	public  BaseResult( String code, String errormsg) {
		this.success=false;
		this.code=code;
		this.errormsg=errormsg;
	}

	public BaseResult(T messageId) {
		this.success=true;
		this.data=messageId;
	}

	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getErrormsg() {
		return errormsg;
	}

	public void setErrormsg(String errormsg) {
		this.errormsg = errormsg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
	
}
